package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallOrderLog;
import com.appkubes.mall.core.po.MallOrderLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallOrderLogMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderLogSqlProvider.class, method="countByExample")
    long countByExample(MallOrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallOrderLogSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallOrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_order_log",
        "where order_log_key = #{orderLogKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String orderLogKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_order_log (order_log_key, app_key, ",
        "version)",
        "values (#{orderLogKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{version,jdbcType=INTEGER})"
    })
    int insert(MallOrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallOrderLogSqlProvider.class, method="insertSelective")
    int insertSelective(MallOrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_log_key", property="orderLogKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrderLog> selectByExampleWithRowbounds(MallOrderLogExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderLogSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_log_key", property="orderLogKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrderLog> selectByExample(MallOrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "order_log_key, app_key, version",
        "from mall_order_log",
        "where order_log_key = #{orderLogKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="order_log_key", property="orderLogKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallOrderLog selectByPrimaryKey(String orderLogKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderLogSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallOrderLog record, @Param("example") MallOrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderLogSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallOrderLog record, @Param("example") MallOrderLogExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderLogSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallOrderLog record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_log
     *
     * @mbg.generated
     */
    @Update({
        "update mall_order_log",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where order_log_key = #{orderLogKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallOrderLog record);
}